home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / WINSOCK.PAK / DLGDGRM.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  1KB  |  55 lines

  1. #if !defined(DLGDGRM_H)
  2. #define DLGDGRM_H
  3.  
  4. #if !defined(OWL_DEFS_H)
  5. # include <owl/defs.h>
  6. #endif
  7. #if !defined(OWL_DIALOG_H)
  8. # include <owl/dialog.h>
  9. #endif
  10. #if !defined(OWL_EDIT_H)
  11. # include <owl/edit.h>
  12. #endif
  13. #if !defined(OWL_WINSOCK_H)
  14. # include <owl/winsock.h>
  15. #endif
  16. #include "sockdemo.rh"
  17.  
  18. class DlgSendDatagram : public TDialog {
  19.   public:
  20.     enum nState { nIdle, nWaitingForAddress, nSendingData } myPresentState;
  21.  
  22.     TEdit*             editAddressSend;
  23.     TEdit*             editAddressReceive;
  24.     TEdit*             editDataSend;
  25.     TEdit*             editDataReceive;
  26.     TEdit*             editPort;
  27.     TStatic*           staticStatus;
  28.  
  29.     TDatagramSocket*   myDatagramSocket;
  30.     char               szDataToSend[256];
  31.     bool               bDataSent;
  32.     TINetSocketAddress sAddressToSendTo;
  33.     THostInfoManager   myHostInfoManager;
  34.  
  35.     DlgSendDatagram(TWindow* parent, TResId resId = IDD_DATAGRAM,
  36.                     TModule* module = 0);
  37.    ~DlgSendDatagram();
  38.     void SetupWindow();
  39.     void CmBtnSend();
  40.     void CmBtnSendClear();
  41.     void CmBtnReceiveClear();
  42.     void CmOk();
  43.     void SendData();
  44.     void ReadData();
  45.     void GoToIdleState();
  46.     void GoToWaitingForAddressState();
  47.     void GoToSendingDataState();
  48.     LRESULT DoHostNotification(WPARAM, LPARAM lParam);
  49.     LRESULT DoSocketNotification(WPARAM, LPARAM lParam);
  50.  
  51.   DECLARE_RESPONSE_TABLE(DlgSendDatagram);
  52. };
  53.  
  54. #endif  // DLGDGRM_H
  55.